package com.sz.app.edi.base.service.impl;

import com.sz.app.edi.base.entity.SynCompanyAccountSetting;
import com.sz.app.edi.base.service.SynCompanyAccountSettingService;
import com.sz.common.base.dao.ParamData;
import com.sz.common.base.service.AbstractService;
import com.sz.common.base.utils.CollectionUtils;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Function: SynCompanyAccountSettingServcieImpl. <br>
 * Date: 2017年07月04日 16:35 <br>
 * Author: wentao.chang
 */
@Service
public class SynCompanyAccountSettingServcieImpl extends AbstractService implements SynCompanyAccountSettingService {
    @Override
    protected String getMapperNamespace() {
        return "edi.SynCompanyAccountSettingMapper";
    }



    @Override
    public List<SynCompanyAccountSetting>  findByClientIdList(List<String> clientIdList, String synCode) {
        List<SynCompanyAccountSetting> synCompanySettings = new ArrayList<>();
        if (!CollectionUtils.isEmpty(clientIdList)) {
            ParamData pd = new ParamData();
            pd.put("clientIds", clientIdList);
            pd.put("synCode", synCode);
            synCompanySettings = dao.findForList(getSqlName("findByClientIdList"), pd, SynCompanyAccountSetting.class);
        }
        return synCompanySettings;
    }

}
